package com.gui.collection.list;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

public class ArrayToListDemo {

    public static void main(String[] args) {

        String[] array = new String[]{"Java", "Python", "PHP", "C++"};
        List<String> list = new ArrayList<>();

        Collections.addAll(list, array);
        System.out.println(list);
        System.out.println(list.getClass().getName());

        array[1] = "JavaScript";

        System.out.println(list);

    }
}
